<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="include/base.jsp" %>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="<%=basePath %>css/bootstrap.min.css">
	<link rel="stylesheet" href="<%=basePath %>css/datePicker.css">
	<link rel="stylesheet" href="<%=basePath %>css/mystyle.css">
	<link rel="stylesheet" href="<%=basePath %>css/style.css">
	<title></title>
	<style type="text/css">
		
	</style>
</head>
<body>
	<jsp:include page="include/top.jsp"/>
	
	<div class="container" style="margin-top:100px">
		<div class="row">
			<div class="span2">
				<jsp:include page="include/left.jsp">
					<jsp:param value="new" name="tag"/>
				</jsp:include>
			
			</div>
			
			<div class="span7" style="margin:0px">
				<div class="well">
					<div class="header">
						<h4>最新动态</h4>
					</div>
					<div class="liner">
					</div>
				</div>
				
				
				
			</div>
			
			
			<div class="lefttask alltask" style="color:#000;position:absolute;margin-left:515px;margin-top:30px;display:none">
				<div class="popover left " >
					<div class="arrow" style="top:15%"></div>
					<h3 class="popover-title">添加新任务</h3>
					<div class="popover-content left" id="left">
								
					</div>
				</div>
						
			</div>
			
			<div class="span3">
				
				
				<div class="well" style="margin-top:30px;">
					<div class="right-head">
						即将到来的任务
					</div>
					<a href="javascript:;" style="font-size:12px;margin-left:10px;" class="leftnewtask">添加新任务</a>
					<strong class="timeline" style="margin-top:0px"> 今日 </strong>
					<div class="task">
						<input type="checkbox">
						<span class="type">Call</span>
						<span >预约王总</span>
					</div>
					<div class="task">
						<input type="checkbox">
						<span class="type">Call</span>
						<span >预约王总</span>
					</div>
					<div class="task">
						<input type="checkbox">
						<span class="type">电话</span>
						<span >预约王总</span>
					</div>

					<strong class="timeline"> 这周 </strong>
					<div class="task">
						<input type="checkbox">
						<span class="type">Call</span>
						<span >界面设计</span>
					</div>
					<div class="task">
						<input type="checkbox">
						<span class="type">Call</span>
						<span >crm</span>
					</div>
					
				</div>
				
			</div>

		</div>
	</div>

	<script type="text/javascript" src="<%=basePath %>js/jquery.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/bootstrap.min.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/date.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/jquery.datePicker.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			//保存任务
			$(".savetask").live("click",function(){
				$(this).hide();
				$(this).next().show();
				var content = $(".taskcontent").val();
				var time = $(".time").val();
				var taskuserid = $(".taskuserid").val();
				var category = $(".category").val();
				var views = null;
				if($(".taskviews").attr("checked")) {
					views = "all";
				}
				var $task = $(this).parent().parent().parent();
							
				$.post("<%=basePath%>task/saveTask.action",{
					"task.content" : content,
					"task.time":time,
					"task.user.id":taskuserid,
					"task.category":category,
					"task.views" : views
					},function(){
						//保存成功后清除所有记录
						$("#top").empty();
						$task.hide();
				});
			});
			
		});
	</script>
</body>
</html>